<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>科泰超市管理系统</title>

</head>

<body class="nav-md">


<center>
    <table border="1">
        <tr>
            <td colspan="7"><button onclick="location.href='add'">添加</button></td>
        </tr>
        <tr id="a">
            <th>花卉编号</th>
            <th>花卉名称</th>
            <th>花卉数量</th>
            <th>花卉品种</th>
            <th>花卉产地</th>
            <th>花卉状态</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${list}" var="item">
            <tr>
                <td>${item.flowerId}</td>
                <td>${item.flowerName}</td>
                <td>${item.flowerNumber}</td>
                <td>${item.flowerType}</td>
                <td>${item.flowerLocation}</td>
                <td>
                    <c:if test="${item.state == 1}">
                        已上架
                    </c:if>
                    <c:if test="${item.state == 2}">
                        未上架
                    </c:if>
                    <c:if test="${item.state == 3}">
                        已售罄
                    </c:if>
                </td>
                <td><button onclick="location.href='delete?flowerId=${item.flowerId}'"/>删除</td>
            </tr>
        </c:forEach>
    </table>
</center>
</body>
</html>
